package databeans;

public class DroidChatUserBean {
	private int userID; // the primary key

	private String username; // the username in which user uses to login
	private String password; // the password in which user uses to login
	private byte[] bytes = null;
	private int bg = 0;
	private int availability = 0;
	private String nickname = null;
	
	public DroidChatUserBean(int aUserID){userID = aUserID;}
	public DroidChatUserBean(){}
	
	public String getUsername() {	return username;	}
	public String getPassword() {	return password;	}
	public int getUserID() 		{	return userID;		}
	
	public void setUsername(String s) {	this.username = s;		}
	public void setPassword(String p) {	this.password = p;		}
	
	public int getBytesSize(){
		if (bytes==null) {
			return -1;
		} else {
			return bytes.length;
		}
	}
	
	public String toString(){
		return "userID: " + this.userID + " username: " + this.username + " password: " + this.password;
	}
	public void setBytes(byte[] pic) {
		this.bytes = pic;
	}
	public byte[] getBytes(){
		return bytes;
	}
	public int getBG() {
		return bg;
	}
	public void setBG(int bg) {
		this.bg = bg;
	}
	public int getAvailability() {
		return availability;
	}
	public void setAvailability(int availability) {
		this.availability = availability;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
}
